package me.pra.melo.operational.character;

public class Main {
    public static void main(String[] args) {
        /*
        正数的补码是它的二进制表示本身
        负数的补码是它绝对值的二进制按位取反再加1
         */
        int a = 8;
        int b = 9;
        System.out.println(Integer.toBinaryString(a));
        System.out.println(Integer.toBinaryString(b));
        System.out.println(a & b);
        System.out.println(a | b);
        System.out.println(a ^ b);
        System.out.println(~a);
        System.out.println(~b);
    }
    /**
     * 1000
     * 1001
     * 8
     * 9
     * 1
     * -9
     * -10
     */
}
